LANG='POSIX'; export LANG > /dev/null
+sed -e 's/^[ \t]*//;s/[ \t]*$//' | # trim leading and trailing spaces
+sed -e 's/ < / \< /g' -e 's/ > /\> /g' | # try replace some unhandled html operators
sed -e :a -e 's/<[^<]*>/ /g;/</{N;s/\n/ /;ba;}' | # remove most html tags
sed -e 's/ / /g' -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g'| # replace HTML special chars
sed -e 's/^[ \t]*//;s/[ \t]*$//' | # trim leading and trailing spaces